<!-- 申报流程 -->
<script setup>
import { useRouter } from 'vue-router';
import { onMounted, ref, reactive } from 'vue';

//获取路由器对象
let router = useRouter();

const activeNames = ref(['1']);


const handleCollapseClick = (name) => {
  switch(name) {
    case '1':
      router.push('/add');
      break;
    case '2':
      router.push('/progress');
      break;
    case '3':
      router.push('/mycase');
      break;
  }
}
//组件挂载完毕
onMounted(() => {
});
const onClickLeft = () => {
  router.push('/declare')
}
</script>
<template>
  <div class=''>
    <van-nav-bar title="申报流程" left-text="返回"
                 left-arrow
                 @click-left="onClickLeft" />
                 <van-collapse v-model="activeNames">
      <van-collapse-item 
        title="进行信息填写" 
        name="1"
        :is-link="false"
        @click="handleCollapseClick('1')">
      </van-collapse-item>
      <van-collapse-item 
        title="等待审核" 
        name="2"
        :is-link="false"
        @click="handleCollapseClick('2')">
      </van-collapse-item>
      <van-collapse-item 
        title="申报结果" 
        name="3"
        :is-link="false"
        @click="handleCollapseClick('3')">
      </van-collapse-item>
    </van-collapse>

  </div>
</template>

<style scoped>
</style>